//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

//#define DEBUG_AUDIO
#ifdef DEBUG_AUDIO
#define DBGOUT(x) (x)
#else
#define DBGOUT(x)
#define DBGCHAR(x)
#endif

#define Dprintf wprintf

typedef int      INT;
typedef unsigned int      UINT;
typedef unsigned int      UINT32;
typedef unsigned short    UINT16;
typedef unsigned char     UINT8;

EXTERN_C int AudioDeviceInitialize();

EXTERN_C void AudioOutSetVolume(UINT16 volume);
EXTERN_C int AudioOutInitial(UINT Rate, UINT16 BitsPerSample, UINT8 Channels);
EXTERN_C HRESULT AudioOutBufCache(byte *pBuffer, UINT Size, UINT *pSizeWritten);
EXTERN_C void AudioOutReset();
EXTERN_C void AudioOutClose();

EXTERN_C int AudioInInitial(UINT Rate, UINT16 BitsPerSample, UINT8 Channels);
EXTERN_C HRESULT AudioInBufCache(byte *pBuffer, UINT Size,UINT *pSizeRead);
EXTERN_C HRESULT AudioInAddBuffer(UINT index);
EXTERN_C void AudioInReset();
EXTERN_C void AudioInClose();
